package com.xingkeduo.util.pojo.domain;

import java.io.Serializable;

/**
 * 验证信息类
 * 
 * @author GJ
 * @time 2019年3月18日 下午8:17:00
 * @description
 */
public class Credential implements Serializable {
	public enum VCodeType {
		LOGIN(1), MODIFYPW(2);

		private int value;

		private VCodeType(int value) {
			this.value = value;
		}

		public int getValue() {
			return value;
		}

		public void setValue(int value) {
			this.value = value;
		}

		public static VCodeType contains(int value) {
			switch (value) {
			case 1:
				return LOGIN;
			case 2:
				return MODIFYPW;
			default:
				return null;
			}
		}
	}

	private static final long serialVersionUID = -7278790883610462588L;
	private String privateKey;// 私钥
	private String publicKey;// 公钥
	private String sign;// 私钥生成签名，返回客户端
	private long signTime;// token刷新时间
	private String token;// 私钥加密sign生成token，前半部分，返回客户端
	private long tokenTime;// token刷新时间
	private Integer status;//完善信息状态
	private String vCode;// 验证码
	private VCodeType vCodeType;
	private long id;

	public String getPrivateKey() {
		return privateKey;
	}

	public void setPrivateKey(String privateKey) {
		this.privateKey = privateKey;
	}

	public String getPublicKey() {
		return publicKey;
	}

	public void setPublicKey(String publicKey) {
		this.publicKey = publicKey;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String getToken() {
		return token;
	}

	public long getSignTime() {
		return signTime;
	}

	public void setSignTime(long signTime) {
		this.signTime = signTime;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public long getTokenTime() {
		return tokenTime;
	}

	public void setTokenTime(long tokenTime) {
		this.tokenTime = tokenTime;
	}

	public String getVCode() {
		return vCode;
	}

	public void setVCode(String vCode) {
		this.vCode = vCode;
	}

	public VCodeType getVCodeType() {
		return vCodeType;
	}

	public void setVCodeType(VCodeType vCodeType) {
		this.vCodeType = vCodeType;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
}
